import java.util.ArrayList;
import java.util.List;

public class TestDemo {
    public static List<Character> inOrderTraversal(BinaryTree.TreeNode root) {
        List<Character> ret = new ArrayList<>();
        if (root == null) return ret;

        List<Character> LeftTree = inOrderTraversal(root.left);
        ret.addAll(LeftTree);

        ret.add(root.val);//添加节点

        List<Character> RightTree = inOrderTraversal(root.right);
        ret.addAll(RightTree);

        return ret;

    }

    public static void main(String[] args) {

        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        List<Character> ret = inOrderTraversal(root);
        System.out.println(ret);
    }
}
